package com.zx.framework.plat.user.po;

import javax.persistence.Column;
import javax.persistence.Embeddable;


/**
 * UserCompanyId entity. @author MyEclipse Persistence Tools
 */
@Embeddable

public class UserCompanyId  implements java.io.Serializable {


    // Fields    

     private String companyId;
     private String userId;


    // Constructors

    /** default constructor */
    public UserCompanyId() {
    }

    
    /** full constructor */
    public UserCompanyId(String companyId, String userId) {
        this.companyId = companyId;
        this.userId = userId;
    }

   
    // Property accessors

    @Column(name="COMPANYID", nullable=false, length=64)

    public String getCompanyId() {
        return this.companyId;
    }
    
    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    @Column(name="USERID", nullable=false, length=64)

    public String getUserId() {
        return this.userId;
    }
    
    public void setUserId(String userId) {
        this.userId = userId;
    }
   



   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof UserCompanyId) ) return false;
		 UserCompanyId castOther = ( UserCompanyId ) other; 
         
		 return ( (this.getCompanyId()==castOther.getCompanyId()) || ( this.getCompanyId()!=null && castOther.getCompanyId()!=null && this.getCompanyId().equals(castOther.getCompanyId()) ) )
 && ( (this.getUserId()==castOther.getUserId()) || ( this.getUserId()!=null && castOther.getUserId()!=null && this.getUserId().equals(castOther.getUserId()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getCompanyId() == null ? 0 : this.getCompanyId().hashCode() );
         result = 37 * result + ( getUserId() == null ? 0 : this.getUserId().hashCode() );
         return result;
   }   





}